#include <INTRINS.H>
#include <REGX52.H>
void Delay500ms()		//@11.0592MHz
{
	unsigned char i, j, k;

	_nop_();
	i = 4;
	j = 129;
	k = 119;
	do
	{
		do
		{
			while (--k);
		} while (--j);
	} while (--i);
}

void main()
{
    unsigned char time;
    time = 1;
    while(1)
    {
        P2 = ~time;
        time = time << 1;
        if(0X00 == time){
            time=1;
        }
        Delay500ms();
    }
}